<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"><!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Basic Page Needs
    ================================================== -->
    <title>登录 - NIIT流媒体平台 - 匠心视界，极致求真</title>
    <meta name="author" content="NIIT流媒体平台">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <!-- <meta name="description" content=""> -->
    <!-- 让IE浏览器用最高级内核渲染页面 还有用 Chrome 框架的页面用webkit 内核
    ================================================== -->
    <meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
    <!-- IOS6全屏 Chrome高版本全屏
    ================================================== -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <!-- 让360双核浏览器用webkit内核渲染页面
    ================================================== -->
    <meta name="renderer" content="webkit">
    <!-- Mobile Specific Metas
    ================================================== -->
    <!-- !!!注意 minimal-ui 是IOS7.1的新属性，最小化浏览器UI -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <!-- CSS
    ================================================== -->
    <link th:href="@{/manager/css/bootstrap.min.css}" href="../public/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link th:href="@{/manager/css/font-awesome.min.css}" href="../public/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!--[if IE 7]>
    <link href="../public/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <![endif]-->

    <link th:href="@{/manager/css/common.css}" href="../public/css/common.css" rel="stylesheet" type="text/css">
    <!-- Favicons
    ================================================== -->
    <link rel="shortcut icon" th:href="@{/manager/images/favicon.ico}"  href="../public/images/favicon.ico">

    <!--[if lt IE 9]>
    <script src="../public/js/html5shiv.js"></script>
    <script src="../public/js/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript" th:src="@{/manager/js/jquery-1.11.1.min.js}" src="../public/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" th:src="@{/manager/js/webutils.js}"  src="../public/js/webutils.js"></script>
    <script type="text/javascript">
        function errMsg(msg) {
            $("#errMsg").show().find("span").text(msg);
        }

        //使用回车登录
        function keyLogin(event) {
            var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
            if (keyCode == 13) {
                $("#login").click();
                return false;
            }
        } // enter 键

        //登陆
        function pageLogin(type) {
            if (!String.prototype.trim) {//如果老环境不支持trim函数，自定义trim()函数
                String.prototype.trim = function () {
                    return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
                };
            }
            var userName = $("#email").val().trim();
            var pwd = $("#password").val();
            var autoThirty = $("#autoThirty").prop("checked")
            $("#errMsg").hide().find("label").text("");

            if (!isNotEmpty(userName)) {
                errMsg("请输入邮箱地址");
                return;
            }
            if (!isNotEmpty(pwd)) {
                errMsg("请输入密码");
                return false;
            }
            $.ajax({
                url: baselocation + "/login",
                data: {'uname': userName, 'password': pwd, "autoThirty": autoThirty},
                type: "post",
                dataType: "json",
                cache: false,
                async: false,
                success: function (result) {
                    if (result.success) {
                        //如果登录成功，则刷新页面
                        var forwordURL = getCookieFromServer("redirect");
                        if (typeof (forwordURL) != "undefined" && forwordURL) {
                            DeleteCookie("forward");
                            window.location.href = forwordURL.replaceAll('"', '');
                            return;
                        }
                        if (type == 1) {
                            window.location.reload();
                        } else if (type == 2) {
                            window.location.href = baselocation + result.entity;
                        } else if (type == 3) {
                            window.location = "/";
                        }
                    } else {
                        $("#requestErrorID").parent().parent().show();
                        if (result.message == 'formDataNot' || result.message == 'false') {
                            $(".c-red").html('<i class="icon-warning-sign"></i>用户名或密码不匹配');
                            $("#errmsg").attr("style", "visibility:visible");
                            return
                        } else if (result.message == 'inputIllegal') {
                            $(".c-red").html('<i class="icon-warning-sign"></i>请不要输入非法数据');
                            $("#errmsg").attr("style", "visibility:visible");
                            return
                        } else if (result.message == 'freezed') {
                            $(".c-red").html('<i class="icon-warning-sign"></i>您的帐号已被冻结，请联系客服');
                            $("#errmsg").attr("style", "visibility:visible");
                            return
                        }
                    }
                }
            });
        }
    </script>
    <style type="text/css"></style>
</head>
<body class="login" onkeydown="keyLogin(event);" style="">
<div class="bg-light" id="curtain"
     style="background-color: transparent; background-image: radial-gradient(circle at 0.660156% 55.8195%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 10%, rgba(0, 0, 0, 0.25) 80%);">
    <section class="login-bx">
        <div id="errshow" class="login-ele">
            <h1 class="text-center"><img th:src="@{/manager/images/logo.png}" src="../public/images/logo.png" width="218" height="58" alt="NIIT流媒体平台"></h1>
            <h3 class="text-center"><small>NIIT流媒体平台 - 匠心视界，极致求真</small></h3>
            <h4 id="errmsg" style="visibility: hidden">
                <p class="text-center"><small class="c-red"><i class="icon-warning-sign"></i></small></p>
            </h4>
            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon"><i class="icon-user"></i></div>
                    <input id="email" name="email" class="form-control" placeholder="请输入登录账号(注册邮箱/手机号)" type="text">
                </div>
            </div>

            <div class="form-group">
                <div class="input-group">
                    <div class="input-group-addon"><i class="icon-lock"></i></div>
                    <input id="password" name="password" class="form-control" placeholder="请输入登录密码" type="password">
                </div>
            </div>
            <!-- 登录验证码暂时不加 -->
            <!-- <div class="form-inline form-group">
                <div class="form-group">
                    <div class="input-group">
                        <div class="input-group-addon"><i class="icon-picture"></i></div>
                        <input class="form-control" placeholder="请输入验证码" type="text">
                    </div>
                </div>
                <img src="" class="ewm-img" height="48" width="98">
                <span class="ewm-shell-btn">
                    看不清楚
                    <br>
                    <a href="">点击刷新</a>
                </span>
            </div> -->
            <div class="modal-footer">
                <button id="login" type="button" onclick="pageLogin(2)" class="btn btn-success btn-block"
                        data-dismiss="modal"> 登 录
                </button>
            </div>
            <!-- <h5><a href=""><i class="icon-hand-right"></i> 忘记密码</a></h5> -->
            <h5><a href="../uc/register.html"><i class="icon-hand-right"></i> <font color="#777">注册账号</font></a></h5>
        </div>
    </section>
</div>
<script type="text/javascript">
    $(function () {
        var c = document.getElementById("curtain");
        if (window.addEventListener) {
            c.addEventListener("mousemove", function (e) {
                var t = c.getBoundingClientRect();
                c.style.backgroundColor = "transparent";
                c.style.backgroundImage = "radial-gradient(  circle at " + (e.clientX - t.left) / (t.right - t.left) * 100 + "% " + (e.clientY - t.top) / (t.bottom - t.top) * 100 + "%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 10%, rgba(0, 0, 0, 0.25) 80%)"
            }),
                c.addEventListener("mouseout", function () {
                    c.style.backgroundColor = "rgba(0, 0, 0, 0.25)",
                        c.style.backgroundImage = "none"
                });
        }
    })

</script>


<audio controls="controls" style="display: none;"></audio>
</body>
<style type="text/css">#yddContainer {
    display: block;
    font-family: Microsoft YaHei;
    position: relative;
    width: 100%;
    height: 100%;
    top: -4px;
    left: -4px;
    font-size: 12px;
    border: 1px solid
}

#yddTop {
    display: block;
    height: 22px
}

#yddTopBorderlr {
    display: block;
    position: static;
    height: 17px;
    padding: 2px 28px;
    line-height: 17px;
    font-size: 12px;
    color: #5079bb;
    font-weight: bold;
    border-style: none solid;
    border-width: 1px
}

#yddTopBorderlr .ydd-sp {
    position: absolute;
    top: 2px;
    height: 0;
    overflow: hidden
}

.ydd-icon {
    left: 5px;
    width: 17px;
    padding: 0px 0px 0px 0px;
    padding-top: 17px;
    background-position: -16px -44px
}

.ydd-close {
    right: 5px;
    width: 16px;
    padding-top: 16px;
    background-position: left -44px
}

#yddKeyTitle {
    float: left;
    text-decoration: none
}

#yddMiddle {
    display: block;
    margin-bottom: 10px
}

.ydd-tabs {
    display: block;
    margin: 5px 0;
    padding: 0 5px;
    height: 18px;
    border-bottom: 1px solid
}

.ydd-tab {
    display: block;
    float: left;
    height: 18px;
    margin: 0 5px -1px 0;
    padding: 0 4px;
    line-height: 18px;
    border: 1px solid;
    border-bottom: none
}

.ydd-trans-container {
    display: block;
    line-height: 160%
}

.ydd-trans-container a {
    text-decoration: none;
}

#yddBottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 22px;
    line-height: 22px;
    overflow: hidden;
    background-position: left -22px
}

.ydd-padding010 {
    padding: 0 10px
}

#yddWrapper {
    color: #252525;
    z-index: 10001;
    background: url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ab20.png);
}

#yddContainer {
    background: #fff;
    border-color: #4b7598
}

#yddTopBorderlr {
    border-color: #f0f8fc
}

#yddWrapper .ydd-sp {
    background-image: url(chrome-extension://eopjamdnofihpioajgfdikhhbobonhbb/ydd-sprite.png)
}

#yddWrapper a, #yddWrapper a:hover, #yddWrapper a:visited {
    color: #50799b
}

#yddWrapper .ydd-tabs {
    color: #959595
}

.ydd-tabs, .ydd-tab {
    background: #fff;
    border-color: #d5e7f3
}

#yddBottom {
    color: #363636
}

#yddWrapper {
    min-width: 250px;
    max-width: 400px;
}</style>
</html>